/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package classcreator;

import java.util.Vector;

/**
 *
 * @author Stefano
 */
public class TestParameterGenerator {
    private Vector<Type> types=new Vector<Type>();
    private Vector<Integer> vals=new Vector<Integer>();
    public TestParameterGenerator(){}
    
    public String getName(Type type){
        for(int i=0; i<types.size(); i++){
            if(types.get(i).name.equals(type.name)){
                String generatedName=Naming.testParameterGenerationName;
                vals.set(i, vals.get(i)+1);
                generatedName=generatedName+type.name+vals.get(i);
                return generatedName;
            }
        }
        types.add(type);
        vals.add(0);
        String generatedName=Naming.testParameterGenerationName;
        generatedName=generatedName+type.name+"0";
        return generatedName;
    }
}
